package com.hoshiicloud.common.constant;

/**
 * 售后状态常量定义 售后状态  0-未售后 1-已售后 2-部分售后
 *
 * @author: zhangshuhu
 * @descripton: 订单状态枚举
 * @date: 14:37 2019/5/27
 */

public enum OrderInfoServiceStatusEnum {

    /**
     * 售后完成
     */
    AFTER_COMPLETE(3, "售后完成"),

    /**
     * 售后关闭
     */
    AFTER_THE_COMPLETION_OF(4, "售后关闭"),

    /**
     * 可以售后
     */
    CAN_AFTER_SALE(1, "可以售后"),

    /**
     * 售后中
     */
    IN_THE_AFTER_SALE(2, "售后中"),
    /**
     * 无需售后
     */
    WITHOUT_AFTER_SALE(0, "无需售后");

    private int code;

    private String name;

    OrderInfoServiceStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static OrderInfoServiceStatusEnum get(int code) {
        for (OrderInfoServiceStatusEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus;
            }
        }
        return null;
    }

}
